<template>
  <div class="categories-container">
    <el-card>
      <template #header>
        <div class="header">
          <h3>资料分类管理</h3>
          <el-button type="primary" size="small">添加分类</el-button>
        </div>
      </template>
      
      <el-table :data="categories" border>
        <el-table-column prop="id" label="ID" width="80" />
        <el-table-column prop="name" label="分类名称" />
        <el-table-column prop="createdAt" label="创建时间" width="180" />
        <el-table-column label="操作" width="150">
          <template #default>
            <el-button size="small">编辑</el-button>
            <el-button size="small" type="danger">删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
const categories = ref([])
</script>

<style scoped>
.categories-container {
  padding: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>